<template>
    <div>
        <!-- 测试图标 -->
        <svg :style="{width,height}">
            <use :xlink:href="prefix + name" :fill="color"></use>
        </svg>
    </div>
</template>

<script lang="ts" setup>

//接受父组件的传递参数
defineProps({
    //xlink:href属性前缀
    prefix: {
        type: String,
        default: "#icon-"
    },
    //图标name
    name: String,
    //颜色
    color: {
        type: String,
        default: ''
    },
    //size
    width: {
        type: String,
        default: '16px'
    },
    height: {
        type: String,
        default: '16px'
    }
})

</script>

<style scoped>

</style>